using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.ComponentModel;

namespace MRSite.Entity 
{
    /// <summary>
    /// 店铺资金分配表
    /// </summary>
    [Table(Name = "shop_account_detail")]
    public class ShopAccountDetail : Entity
    {
        /// <summary>
        ///自增ID
        /// </summary>
        [Column(Name = "id", IsPrimaryKey = true, CanBeNull = false, IsVersion = true)]
        public override int id { get; set; }

        /// <summary>
        ///用户ID
        /// </summary>
        [Column(Name = "user_id")]
        public int user_id { get; set; }

        /// <summary>
        ///用户名
        /// </summary>
        [Column(Name = "user_name")]
        public String user_name { get; set; }

        /// <summary>
        /// 标题
        /// </summary>
        [Column(Name = "title")]
        public String title { get; set; } 

        /// <summary>
        /// 订单id
        /// </summary>
        [Column(Name = "orderid")]
        public int orderid { get; set; }

        /// <summary>
        ///订单编号
        /// </summary>
        [Column(Name = "order_no")]
        public String order_no { get; set; }

        /// <summary>
        /// 订单产品项id
        /// </summary>
        [Column(Name = "orderItemid")]
        public int orderItemid { get; set; }

        /// <summary>
        ///订单金额
        /// </summary>
        [Column(Name = "sell_price"), DefaultValue(0)]
        public decimal sell_price { get; set; }

        /// <summary>
        /// 现金部分（结算）
        /// </summary>
        [Column(Name = "commission"), DefaultValue(0)]
        public decimal commission { get; set; }

        /// <summary>
        ///已打款佣金
        /// </summary>
        [Column(Name = "commission_pay"), DefaultValue(0)]
        public decimal commission_pay { get; set; }

        /// <summary>
        /// 红包账户（结算）
        /// </summary>
        [Column(Name = "hongbao"), DefaultValue(0)]
        public decimal hongbao { get; set; }

        /// <summary>
        ///已打款红包账户
        /// </summary>
        [Column(Name = "hongbao_pay"), DefaultValue(0)]
        public decimal hongbao_pay { get; set; }

        /// <summary>
        /// 扣除优惠红包
        /// </summary>
        [Column(Name = "kchongbao"), DefaultValue(0)]
        public decimal kchongbao { get; set; }


       

        /// <summary>
        /// 扣除平台服务费
        /// </summary>
        [Column(Name = "fee"), DefaultValue(0)]
        public decimal fee { get; set; }
        

        /// <summary>
        ///-1 无效 0 未知 1 生成 2 审核通过 3 已经结算
        /// </summary>
        [Column(Name = "status")]
        public int status { get; set; }


        /// <summary>
        ///备注说明
        /// </summary>
        [Column(Name = "remark")]
        public String remark { get; set; }

        /// <summary>
        /// 添加时间（支付时）
        /// </summary>
        [Column(Name = "add_time", IsDbGenerated = true)]
        public DateTime add_time { get; set; }

        /// <summary>
        /// 申请时间 （未用到）
        /// </summary>
        [Column(Name = "applytime")]
        public DateTime? applytime { get; set; }

        /// <summary>
        /// 通过时间 （收货时）
        /// </summary>
        [Column(Name = "checktime")]
        public DateTime? checktime { get; set; }

        /// <summary>
        /// 结算时间（收货7天后）
        /// </summary>
        [Column(Name = "paytime")]
        public DateTime? paytime { get; set; }

        /// <summary>
        ///无效时间
        /// </summary>
        [Column(Name = "invalidtime")]
        public DateTime? invalidtime { get; set; }
         

        /// <summary>
        /// 店铺id
        /// </summary>
        [Column(Name = "shopid"), DefaultValue(0)]
        public int shopid { get; set; }

        /// <summary>
        /// 基于给奖励的用户id
        /// </summary>
        [Column(Name = "jiandian_userid"), DefaultValue(0)]
        public int jiandian_userid { get; set; }

      
    }
}